#include <stdio.h>

#include "tests.h"
#include "../source/udp/Package.h"
#include "../source/udp/UDPReceiver.h"

void printInfoPacket(Info coords);

/*
 * Receive 5 packets and print them
 *
 */
bool testUDPReceiver() {
	int i,n=5;
	Info coords;
	for (i=0; i<n; i++) {
		coords = receiveCoords();
		printInfoPacket(coords);
	}	
	return 1;
}

void printInfoPacket(Info coords) {
	printf("- Packet: Robot (%d, %d, %d), Doel (%d, %d), Garage (%d; %d)\n", coords.robx, coords.roby, coords.robhoek, coords.doelx, coords.doely, coords.garx, coords.gary); 
}
